package com.bwie.controller;

import com.bwie.pojo.Report;
import com.bwie.pojo.ReportNation;
import com.bwie.service.ReportService;
import com.bwie.utils.R;
import io.swagger.models.auth.In;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author GaoYiJie
 * @Description
 * @Create 2025/4/17 11:52
 * @Version 1.0
 */
@RestController
@RequestMapping("/system/report")
public class ReportController {

    @Resource
    ReportService reportService;


    /**
     * 上报
     */

    @PostMapping
    public R report(@RequestBody ReportNation reportNation){
        return reportService.report(reportNation);
    }

    /**
     * 获取上报数据
     */
    @GetMapping
    public R getReportNationById(Integer id){
        return reportService.getReportNationList(id);
    }

}
